<template>
  <div class="me">
    <div class="main">

      <div class="aside" style="width: 240px">
        <h2 class="tips-main-text" style="">
          个人中心</h2>
        <el-menu
            class="el-menu-vertical-demo">
          <router-link to="/me/order">
            <el-menu-item index="2">
              <i class="el-icon-s-order aside-text" style=""></i>
              <span class="aside-text" style="letter-spacing: 1px" slot="title">我的订单</span>
            </el-menu-item>
          </router-link>
          <router-link to="/me/setting">
            <el-menu-item index="3">
              <i class="el-icon-setting aside-text" style=""></i>
              <span class="aside-text" style="letter-spacing: 1px" slot="title">基本设置</span>
            </el-menu-item>
          </router-link>
        </el-menu>
      </div>

      <div class="content">
        <router-view/>
      </div>

    </div>
  </div>
</template>

<script>
import {findById} from "@/api/user";
import {SearchFilm} from "@/api/film";

export default {
  name: "Header",
  data() {
    return {
      isLogin: false,
      searchList: [],
      state: '',
      timeout: null,
      user: {},
    }
  },

  mounted() {
    if (localStorage.getItem("uid") !== null) {
      findById(localStorage.getItem("uid")).then(res => {
        this.isLogin = true;
        this.user = res.data;
      })
    }
  },

  methods: {},

}
</script>

<style scoped>
.me {
  padding: 70px 180px;
}

.main {
  height: 900px;
  background: #28243c;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
}

.aside {
  float: left;
  height: 100%;
  background: #39354f;

}

.el-menu {
  border-right: none;
}

.content {
  float: left;
  padding: 10px 40px;
  width: 800px;
}

.tips-main-text {
  text-align: center;
  padding: 10px 0;
  letter-spacing: 2px;
  font-weight: 400;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, Helvetica, sans-serif, "宋体";
  color: #f0f0f0;
}

.aside-text {
  font-family: "PingFang SC", "Microsoft YaHei", Arial, Helvetica, sans-serif, "宋体";
  color: #f0f0f0;
}

::v-deep .el-menu-item {
  background-color: #605b7f;
  color: #f0f0f0;
  
}

::v-deep .is-active .aside-text {
  color: #7b8cf6;
}

::v-deep .el-menu-item:hover {
  background-color: #7b8cf6;
}

::v-deep .el-menu-item:hover .aside-text {
  color: #f0f0f0;
}
</style>